package org.baicaixiaozhan.springbootwebdemo1.service;

import org.baicaixiaozhan.springbootwebdemo1.domain.User;
import org.baicaixiaozhan.springbootwebdemo1.vo.UsernameAndPasswordAuthenticationRequest;

import javax.security.auth.message.AuthException;

/**
 * @author baicaixiaozhan
 * @since 2021/1/29
 */
public interface UserService {

    /**
     * 对登录 username-password 进行认证处理
     *
     * @throws {@link AuthException}
     * @param request
     * @return
     */
    User authenticate(UsernameAndPasswordAuthenticationRequest request) throws AuthException;
}
